package com.linwen.javase.genericParadigm;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : linwen
 * @date : 下午10:57 2021/8/11
 */
public class TestCompare {
    public static void main(String[] args) {
        CircleCompare circleCompare0 = new CircleCompare(2);
        CircleCompare circleCompare1 = new CircleCompare(3);
        System.out.println(circleCompare0.getArea());
        System.out.println(circleCompare1.getArea());
        System.out.println(circleCompare0.compare(circleCompare1));
        //传参为Integer
        Integer[] arr = new Integer[]{1,2,3,4};
        List<Integer> list = CircleCompare.transform(arr);
        System.out.println(list);
        //传参为CircleCompare
        CircleCompare[] circleCompares = new CircleCompare[2];
        circleCompares[0] = circleCompare0;
        circleCompares[1] = circleCompare1;
        List<CircleCompare> list1 = CircleCompare.transform(circleCompares);
        System.out.println(list1);

    }


}
